#ifndef CardMem_h__
#define CardMem_h__

#include "Card.h"

typedef struct MifareAuthParamTag {
	uint8_t sector;
	uint8_t keyType;
}MifareAuthParam_T;

Card_T * Card_Mem_Create(WCI * wci, unsigned char type);

void Card_Mem_Destroy(Card_T * card);

int Card_Mem_Authen(Card_T * card, void * param, uint8_t * key, uint8_t klen);

int Card_Mem_Read(Card_T * card, uint32_t address, uint8_t * buf, uint16_t len);

int Card_Mem_Write(Card_T * card, uint32_t address, uint8_t * buf, uint16_t len);

int Card_Mem_Control(Card_T* card, uint8_t opcode, void* param, void* cbuf, uint16_t clen, void* rbuf, uint16_t *rlen);

int Card_Mem_Setup(Card_T* card, void* param);

#endif // CardMem_h__

